home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / misc / installer / install < prev    next >
Text File  |  1999-04-19  |  9KB  |  239 lines

  1.  
  2. /*********************************************************************************************
  3.  *
  4.  * installation script for the SavInstaller $VER: 0.8 (20.03.99)
  5.  *
  6.  * note, that this script makes use of seveal new features of the Savage-Installer
  7.  * like multilined comments, the new builtin variable @system-language and the
  8.  * enhanced pattern-match functionality of the DATABASE function
  9.  *
  10.  *********************************************************************************************/
  11.  
  12. (if (= @system-language "english")
  13.  
  14.     (
  15.       (set #msg_welcome (cat "Welcome to the Installation of the Savage-Installer\n\n"
  16.                              "The Savage-Installer wants to be a substitution of\n"
  17.                              "the original Installer by C=\n"
  18.                              "It offers many new features, looks much better and is\n"
  19.                              "smaller than the C= Installer"
  20.                         )
  21.       )
  22.       (set #msg_askfile_prompt "Where is the default Installer located?")
  23.       (set #msg_askfile_help (cat "Please select the original Installer by C=. "
  24.                                   "This script will make a backup copy of the "
  25.                                   "Installer and then, it will replace the "
  26.                                   "original by the new Savage-Installer."
  27.                              )
  28.       )
  29.       (set #msg_copylib_prompt "Now copying the Savage-Installer to \"%s\"")
  30.       (set #msg_copylib_help "")
  31.       (set #msg_askbool_prompt (cat "Your prefered language is \"%s\"\n"
  32.                                     "Do you want to install the related catalog (if it exists)?"
  33.                                )
  34.       )
  35.       (set #msg_askbool_help "")
  36.       (set #msg_done (cat "Done!\n"
  37.                           "The Savage-Installer replaced the original Installer\n"
  38.                           "and made a copy of the old one in \"%s\".\n\n"
  39.                           "Have fun with the new Installer and its features"
  40.                      )
  41.       )
  42.       (set #msg_rename_prompt "Now renaming the C= installer")
  43.       (set #msg_rename_help "")
  44.  
  45.       (set #msg_copytools_prompt "Which additional tools you want to install? (see Help)")
  46.       (set #msg_copytools_help "")
  47.  
  48.       (set #msg_tooltypes_prompt "Which Tooltypes you want to preset?")
  49.       (set #msg_tooltypes_help "")
  50.  
  51.       (set #message_letsgo "Installation prepared. Ready to proceed?")
  52.     )
  53. )
  54.  
  55. (if (= @system-language "deutsch")
  56.  
  57.     (
  58.       (set #msg_welcome (cat "Willkommen zur Installation des Savage-Installer\n\n"
  59.                              "Der Savage-Installer soll ein Ersatz für den\n"
  60.                              "originalen Installer von C= sein\n"
  61.                              "Er bietet viele neue Eigenschaften, sieht viel besser aus\n"
  62.                              "und ist kleiner als der C= Installer"
  63.                         )
  64.       )
  65.       (set #msg_askfile_prompt "Wo befindet sich der Installer?")
  66.       (set #msg_askfile_help (cat "Bitte wählen Sie den originalen Installer von C=. "
  67.                                   "Dieses Skript macht eine Kopie des originalen "
  68.                                   "Installers und wird danach den originalen durch "
  69.                                   "den neuen Savage-Installer ersetzen."
  70.                              )
  71.       )
  72.       (set #msg_copylib_prompt "Kopiere jetzt den Savage-Installer nach \"%s\"")
  73.       (set #msg_copylib_help "")
  74.       (set #msg_askbool_prompt (cat "Ihre eingestellte Sprache ist \"%s\"\n"
  75.                                     "Wollen Sie einen entsprechenden Katalog (falls "
  76.                                     "vorhanden) installieren?"
  77.                                )
  78.       )
  79.       (set #msg_askbool_help "")
  80.       (set #msg_done (cat "Fertig!\n"
  81.                           "Der Savage-Installer hat Ihren originalen Installer\n"
  82.                           "ersetzt und eine Kopie des alten als \"%s\" erzeugt.\n\n"
  83.                           "Viel Spaß mit dem neuen Installer und seinen Möglichkeiten"
  84.                      )
  85.       )
  86.       (set #msg_rename_prompt "Benenne nun den C= Installer um")
  87.       (set #msg_rename_help "")
  88.  
  89.       (set #msg_copytools_prompt "Welche zusätzlichen Programme wollen Sie installieren?")
  90.       (set #msg_copytools_help "")
  91.  
  92.       (set #msg_tooltypes_prompt "Welche Tooltypes möchten Sie voreinstellen? (siehe Hilfe)")
  93.       (set #msg_tooltypes_help "")
  94.  
  95.       (set #message_letsgo "Installation vorbereitet. Soll nun weitergemacht werden?")
  96.     )
  97. )
  98.  
  99. /*********************************************************************************************/
  100.  
  101. (set @app-name "Savage-Installer")
  102. (user expert)
  103. (message #msg_welcome)
  104. (welcome)
  105. (complete 0)
  106.  
  107. ; -----------------------------------------------------------------------------
  108. ; the default settings
  109.  
  110. (set #default_installer "c:installer"
  111.      #default_localize 0
  112.      #default_tools 0
  113.      #default_tooltypes 0
  114. )
  115.  
  116. ; -----------------------------------------------------------------------------
  117. ; first of all let the user make all the required settings
  118. ; for the installation
  119.  
  120. (swing
  121.  
  122.   (set #default_installer (askfile (prompt #msg_askfile_prompt)
  123.                                    (default #default_installer)
  124.                                    (help #msg_askfile_help)
  125.                           )
  126.   )
  127.  
  128.   (set #default_localize (askbool (prompt (#msg_askbool_prompt @system-language))
  129.                                   (help #msg_askbool_help)
  130.                                   (default #default_localize)
  131.                          )
  132.   )
  133.  
  134.   (set #default_tools (askoptions (prompt #msg_copytools_prompt)
  135.                                   (help #msg_copytools_help)
  136.                                   (default #default_tools)
  137.                                   (choices "CloseScreenPatch" "GetSum")
  138.                       )
  139.   )
  140.  
  141.   (set #default_tooltypes (askoptions (prompt #msg_tooltypes_prompt)
  142.                                       (help #msg_tooltypes_help)
  143.                                       (default #default_tooltypes)
  144.                                       (choices "LAZYCOMPILE" "DEBUGMODE"
  145.                                                "CREATEUNSINSTALL" "COPYFILESCOMMENT"
  146.                                                "ALWAYSCONFIRM" "NOSYSDELETE"
  147.                                       )
  148.                           )
  149.   )
  150.  
  151.   (message #message_letsgo)
  152. )
  153.  
  154. ; -----------------------------------------------------------------------------
  155. ; now the installation process itself
  156.  
  157. (set #installer_backup (cat #default_installer ".backup"))
  158.  
  159. (if (not (exists #installer_backup (noreq)))
  160.     (
  161.       (rename #default_installer #installer_backup (confirm average)
  162.                                                    (prompt #msg_rename_prompt)
  163.                                                    (help #msg_rename_help)
  164.       )
  165.     )
  166.  
  167. (complete 20)
  168.  
  169. (copylib (prompt (#msg_copylib_prompt #default_installer))
  170.          (help #msg_copylib_help)
  171.          (confirm average)
  172.          (source (if (database "cpu" "(68000|68010)")
  173.                      ("c/installer000")
  174.                      ("c/installer020")
  175.                  )
  176.          )
  177.          (dest (pathonly #default_installer))
  178.          (newname (fileonly #default_installer))
  179.          (infos)
  180. )
  181.  
  182. (complete 40)
  183.  
  184. (if #default_localize
  185.  
  186.     (
  187.       (set #catalog_source (tackon (tackon "catalogs" @system-language) "savageinstaller.catalog"))
  188.       (if (exists #catalog_source (noreq))
  189.           (copyfiles (source #catalog_source)
  190.                      (dest (tackon "locale:catalogs" @system-language))
  191.           )
  192.       )
  193.     )
  194. )
  195.  
  196. (complete 60)
  197.  
  198. (
  199.   (if (bitand #default_tools 1)
  200.       (
  201.         (copyfiles (source "tools/GetSum")
  202.                    (dest "C:")
  203.         )
  204.       )
  205.   )
  206.  
  207.   (if (bitand #default_tools 2)
  208.       (
  209.         (copyfiles (source "tools/CloseScreenPatch")
  210.                    (dest "C:")
  211.         )
  212.       )
  213.   )
  214. )
  215.  
  216. (complete 80)
  217.  
  218. (tooltype (dest #default_installer)
  219.           (setstack 50000)
  220.           (if (bitand #default_tooltypes  1) (settooltype "LAZYCOMPILE" "")
  221.                                              (settooltype "(LAZYCOMPILE)" ""))
  222.           (if (bitand #default_tooltypes  2) (settooltype "DEBUGMODE" "")
  223.                                              (settooltype "(DEBUGMODE)" ""))
  224.           (if (bitand #default_tooltypes  4) (settooltype "CREATEUNINSTALL" "")
  225.                                              (settooltype "(CREATEUNINSTALL)" ""))
  226.           (if (bitand #default_tooltypes  8) (settooltype "COPYFILECOMMENT" "")
  227.                                              (settooltype "(COPYFILECOMMENT)" ""))
  228.           (if (bitand #default_tooltypes 16) (settooltype "ALWAYSCONFIRM" "")
  229.                                              (settooltype "(ALWAYSCONFIRM)" ""))
  230.           (if (bitand #default_tooltypes 32) (settooltype "NOSYSDELETE" "")
  231.                                              (settooltype "(NOSYSDELETE)" ""))
  232. )
  233.  
  234. (complete 100)
  235.  
  236. (exit (#msg_done #installer_backup) (quiet))
  237.  
  238.